﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace EPS.Contracts
{


    public partial class Project : IDataErrorInfo
    {
        #region IDataErrorInfo Members

        public string Error
        {
            get { return this[null]; }
        }

        public string this[string propertyName]
        {
            get
            {
                string result = string.Empty;
                propertyName = propertyName ?? string.Empty;
                if (propertyName == string.Empty || propertyName == "ProjName")
                {
                    if (string.IsNullOrEmpty(this.ProjName))
                    {
                        result += "工程名不能为空." + Environment.NewLine;
                    }
                }

                //if (propertyName == string.Empty || propertyName == "TemplateKeyid")
                //{
                //    if (string.IsNullOrEmpty(this.TemplateKeyid))
                //    {
                //        result += "请选择项目模块."
                //            + Environment.NewLine;
                //    }
                //}
                return result.TrimEnd();
            }
        }

        #endregion
    }
}
